<template>
  <div>
    <div>
      <button @click="goOne">one</button>
      <button @click="goTwo(1)">two</button>
      <button @click="goTwo(2)">two</button>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "App",
  methods: {
    goOne() {
      this.$router.push("/one");
    },
    goTwo(id) {
      this.$router.push(`/two//${id}`);
    },
  },
};
</script>

<style>
.one {
  margin: 20px;
}
</style>